package com.ztgf.order.models.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ztgf.order.models.bo.OrderBusinessContractBO;
import com.ztgf.order.models.bo.OrderContractCenterBO;
import com.ztgf.order.models.bo.OrderContractRelationSaveBO;
import com.ztgf.order.models.dto.OrderContractRelationDTO;
import com.ztgf.order.models.dto.OrderInfoDTO;
import com.ztgf.order.models.vo.OrderBusinessContractVO;
import com.ztgf.order.models.vo.OrderContractCenterVO;

import java.io.IOException;

/**
 * 订单合同关系表服务
 *
 * @author chenyu.wang
 * @Date 2020-06-03 15:58:52
 */
public interface IOrderContractRelationService extends IService<OrderContractRelationDTO> {
    boolean add(OrderContractRelationSaveBO saveBO);

    /**
     * description: 个人中心我的合同
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-06-04
     * return: com.baomidou.mybatisplus.plugins.Page<com.ztgf.order.models.vo.OrderContractRelationVO>
     */
    Page<OrderContractCenterVO> queryMyContractList(OrderContractCenterBO bo,Integer contactType);

    String getContractByOrderId(Long orderId);
    String getSignaturePage(Long orderId, Long id,int type,String orderIds,Long contractId);

    String updateByOrderId(String param, Long orderId,byte[] bytes) throws IOException;

    OrderContractRelationDTO getByOrderId(Long orderId);

    /**
     * description: 后台管理系统交易合同列表
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: com.baomidou.mybatisplus.plugins.Page<com.ztgf.order.models.vo.OrderBusinessContractVO>
     */
    Page<OrderBusinessContractVO> queryBusinessContractList(OrderBusinessContractBO bo,Integer contactState);

    OrderInfoDTO getOrderInfoByContractId(Long contractId);

    String getAbandonSignaturePage(Long orderId,Long shopId, int signType);

    Long addAndReturnId(OrderContractRelationSaveBO saveBO);
}
